-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add tests #36
base: master
Are you sure you want to change the base?
WIP: Add tests #36
Conversation
hm, I'm actually not sure about this yml stuff, I've never used it are these just standard unit tests, or tests in the sense that we test something against data? |
@dburov190 I suggest we start with simple easy tests (for a start we just want to ensure that the functions described in the README execute without error; the current method of running the examples will not scale). The tests I've included combines a test for the instantiation of the samplers and transition rate class (implicitly), as well as a test that ensures we can reproduce the results of the random samplers. Ideally we would also validate the algorithms we are using (for example, the implementation of the Kalman filter). We'll see what we have time for. |
def get_rates(rates_name): | ||
return getattr(king_county_transition_rates(population=3, random_seed=1234), rates_name) | ||
|
||
transition_rates = king_county_transition_rates(population=3, random_seed=1234) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems outdated now because scenarios
don't have king_count_transition_rates
anymore
but I like this test and overall idea, could you massage this into a running test? I'd start adding tests then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this PR has gone stale. I agree this PR should be revived.
A low-effort solution would be to implement a few simple tests for our most high-level objects, since this will implicitly test lower-level functionality.
We can also consider running some of the examples during testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd actually strip apart some of the examples into shorter tests, but, one way or another, we must start writing them, there are so many bugs right now that it's actually scary :/
The tests are run by navigating to
/test
and typingI think we need to add
pytest
to theyml
as well. @dburov190 and @agarbuno please advise (or simply commit to this PR).Resolves #35